﻿<UserControl x:Class="Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Views.HowToSearchControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="600">
    <Border BorderBrush="DarkGray" BorderThickness="1">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" Background="DarkGray">
                <TextBlock Foreground="White" FontWeight="Bold" HorizontalAlignment="Center">How To Search</TextBlock>
            </StackPanel>
            <TextBlock Grid.Row="1" Background="White" TextWrapping="Wrap" Padding="5">
                    <FlowDocumentScrollViewer>
                        <FlowDocument FontFamily="Tahoma" FontSize="12">
                            <Paragraph>
                                <Bold>1. Basic Search</Bold>
                            </Paragraph>
                            <Section Padding="15,0,15,0">
                                <Paragraph>
                                    When you input any text to search box and press enter key (or click search button),
                                    FxCop Integrator will search violations that contain search word in any column.
                                    If you input two or more search words, FxCop Integrator will find out violations that contain all of them.<LineBreak/>
                                    And, you can contain white space in search word with ' or ".
                                </Paragraph>
                                <Paragraph>
                                    Example :
                                </Paragraph>
                                <List>
                                    <ListItem>
                                        <Paragraph FontFamily="Consolas">
                                            Foo "Bar1 Bar2"
                                        </Paragraph>
                                    </ListItem>
                                </List>
                            </Section>
                            <Paragraph>
                                <Bold>2. AND/OR Search, Grouping with Parenthesis</Bold>
                            </Paragraph>
                            <Section Padding="15,0,15,0">
                                <Paragraph>
                                    FxCop Integrator Search feature supports the logical operator AND and OR.
                                    The default behavior is AND search.
                                    But, if you want to specifically allow either one of several words, you can use the OR operator.
                                </Paragraph>
                                <Paragraph>
                                    Example :
                                </Paragraph>
                                <List>
                                    <ListItem>
                                        <Paragraph FontFamily="Consolas">
                                            Foo AND Bar   (This expression equals Foo Bar)
                                        </Paragraph>
                                    </ListItem>
                                    <ListItem>
                                        <Paragraph FontFamily="Consolas">
                                            Foo OR Bar
                                        </Paragraph>
                                    </ListItem>
                                </List>
                                <Paragraph>
                                    FxCop Integrator also support parenthesis to group search words.
                                </Paragraph>
                                <Paragraph>
                                    Example :
                                </Paragraph>
                                <List>
                                    <ListItem>
                                        <Paragraph FontFamily="Consolas">
                                            (Foo1 OR Foo2) AND Bar
                                        </Paragraph>
                                    </ListItem>
                                </List>
                            </Section>
                            <Paragraph>
                                <Bold>3. Specific Column Search</Bold>
                            </Paragraph>
                            <Section Padding="15,0,15,0">
                                <Paragraph>
                                    You can search throught the specific column by a word starts with a special prefix.
                                    FxCop Integrator supports following prefixes:
                                </Paragraph>
                                <Table>
                                    <Table.Columns>
                                        <TableColumn Width="75"/>
                                        <TableColumn Width="75"/>
                                        <TableColumn/>
                                    </Table.Columns>
                                    <TableRowGroup>
                                        <TableRow Background="LightGray">
                                            <TableCell>
                                                <Paragraph TextAlignment="Center" FontWeight="Bold">Prefix</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph TextAlignment="Center" FontWeight="Bold">Short Form</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph TextAlignment="Center" FontWeight="Bold">Description</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                        <TableRow>
                                            <TableCell>
                                                <Paragraph>kind</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>k</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>searches through Kind column (most left column) only</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                        <TableRow>
                                            <TableCell>
                                                <Paragraph>project</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>p</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>searches through Project column only</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                        <TableRow>
                                            <TableCell>
                                                <Paragraph>file</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>f</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>searches through File column only</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                        <TableRow>
                                            <TableCell>
                                                <Paragraph>id</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph></Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>searches through CheckId column only</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                        <TableRow>
                                            <TableCell>
                                                <Paragraph>category</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>c</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>searches through Category column only</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                        <TableRow>
                                            <TableCell>
                                                <Paragraph>message</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>m</Paragraph>
                                            </TableCell>
                                            <TableCell>
                                                <Paragraph>searches through Message column only</Paragraph>
                                            </TableCell>
                                        </TableRow>
                                    </TableRowGroup>
                                </Table>
                                <Paragraph>
                                    Example :
                                </Paragraph>
                                <List>
                                    <ListItem>
                                        <Paragraph FontFamily="Consolas">
                                            c:Foo AND m:Bar
                                        </Paragraph>
                                    </ListItem>
                                    <ListItem>
                                        <Paragraph FontFamily="Consolas">
                                            (id:Foo1 OR id:Foo2) AND project:Bar
                                        </Paragraph>
                                    </ListItem>
                                </List>
                            </Section>
                        </FlowDocument>
                    </FlowDocumentScrollViewer>
            </TextBlock>
        </Grid>
    </Border>
</UserControl>
